package com.project.system.domain.entity;

import com.project.common.domain.po.DbBase;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author : [chg]
 * @className : EmployeeSettlementCycle
 * @description : 员工结算周期实体
 * @createTime : [2025/7/9 11:30]
 */
@Entity
@Data
@Table(name = "tb_employee_settlement_cycle_log")
@org.hibernate.annotations.Table(appliesTo = "tb_employee_settlement_cycle_log", comment = "员工结算周期更改记录")
public class HrEmployeeSettlementCycleLog extends DbBase {
    @Column(columnDefinition = "bigint DEFAULT NULL COMMENT '结算ID'")
    private Long settlementCycleId; // 结算周期ID

    @Column(columnDefinition = "bigint DEFAULT NULL COMMENT '用户ID'")
    private Long userId; // 用户ID

    @Column(columnDefinition = "int DEFAULT NULL COMMENT '发薪周期（1-每月,2-半月,3-每周）'")
    private Integer payCycle; // 发薪周期（1-每月,2-半月,3-每周）

    @Column(columnDefinition = "date DEFAULT NULL COMMENT '开始时间'")
    private LocalDate startTime; // 开始时间

    @Column(columnDefinition = "date DEFAULT NULL COMMENT '结束时间'")
    private LocalDate endTime; // 结束时间

    @Column(columnDefinition = "int DEFAULT NULL COMMENT '实际出勤天数'")
    private Integer actualAttendanceDays; // 实际出勤天数

    @Column(columnDefinition = "int DEFAULT NULL COMMENT '迟到次数'")
    private Integer lateCount; // 迟到次数

    @Column(columnDefinition = "int DEFAULT NULL COMMENT '早退次数'")
    private Integer earlyLeaveCount; // 早退次数

    @Column(columnDefinition = "int DEFAULT NULL COMMENT '旷工天数'")
    private Integer absentDays; // 旷工天数

    @Column(columnDefinition = "int DEFAULT NULL COMMENT '请假总天数'")
    private Integer totalLeaveDays; // 请假总天数

    @Column(columnDefinition = "int DEFAULT NULL COMMENT '加班天数'")
    private Integer overtimeDays; // 加班天数

    @Column(columnDefinition = "int DEFAULT NULL COMMENT '加班时长'")
    private Integer overtimeMinutes; // 加班时长

    @Column(columnDefinition = "decimal(10,2) DEFAULT NULL COMMENT '基本工资'")
    private BigDecimal basicSalary; // 基本工资

    @Column(columnDefinition = "decimal(10,2) DEFAULT NULL COMMENT '节假日上班补贴'")
    private BigDecimal holidaySubsidy; // 节假日上班补贴

    @Column(columnDefinition = "decimal(10,2) DEFAULT NULL COMMENT '加班工资'")
    private BigDecimal overtimeSalary; // 加班工资

    @Column(columnDefinition = "decimal(10,2) DEFAULT NULL COMMENT '当前预支工资'")
    private BigDecimal currentAdvanceSalary; // 当前预支工资

    @Column(columnDefinition = "decimal(10,2) DEFAULT NULL COMMENT '当前借款'")
    private BigDecimal currentLoan; // 当前借款

    @Column(columnDefinition = "decimal(10,2) DEFAULT NULL COMMENT '本次预支扣款'")
    private BigDecimal advanceDeduction; // 本次预支扣款

    @Column(columnDefinition = "decimal(10,2) DEFAULT NULL COMMENT '本次借款扣款'")
    private BigDecimal loanDeduction; // 本次借款扣款

    @Column(columnDefinition = "decimal(10,2) DEFAULT NULL COMMENT '实发工资'")
    private BigDecimal netSalary; // 实发工资

    @Column(columnDefinition = "int DEFAULT 0 COMMENT '状态（0-未发，1-已发）'")
    private Integer status; // 状态

    @Column(columnDefinition = "varchar(500) DEFAULT NULL COMMENT '备注'")
    private String remark; // 备注

    @Column(columnDefinition = "varchar(1000) DEFAULT NULL COMMENT '修改备注'")
    private String editRemark; // 备注
}